package com.chrray.position.domain.dto;

import com.beust.jcommander.internal.Lists;
import com.chrray.position.enums.YesNoEnum;
import com.chrray.position.enums.app.FdEduLevelEnum;
import com.chrray.position.enums.app.FdGenderEnum;
import com.chrray.position.enums.app.FdWorkYearEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * @author liujianxin
 * @date 2024/09/03 11:16
 */
@Data
public class NearbyWorkerDTO {
    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "距离你多少公里")
    private Double distance;

    @ApiModelProperty(value = "用户名称")
    private String userName;

    @ApiModelProperty(value = "用户头像")
    private String avatar;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "性别:1-男,2-女,3-不限")
    private Integer gender;

    @ApiModelProperty(value = "学历:1.初中及以下，2.高中，3.大专，4.本科，5.硕士，6博士及以上")
    private Integer eduLevel;

    @ApiModelProperty(value = "工作年限:1.无工作经验，2.  0-1年，3.  1-3年，4.  3-5年，5.  5-10年，6.  10年以上")
    private Integer workYears;

    @ApiModelProperty(value = "是否已实名认证: 1-已经实名,0-未实名")
    private Integer realNamed;

    @ApiModelProperty(value = "是否已企业实名认证: 1-已经实名,0-未实名")
    private Integer entRealNamed;

    @ApiModelProperty(value = "是否已个人实名认证: 1-已经实名,0-未实名")
    private Integer personalRealNamed;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "该雇工最新坐标,经度")
    private Double lat;

    @ApiModelProperty(value = "该雇工最新坐标,纬度")
    private Double lon;


    @ApiModelProperty(value = "期望职位名称列表,关联后台配置的职位")
    private List<String> expectedPositionNames;

    public void setExpectedPositionNames(String expectedPositionNames) {
        if(!StringUtils.isEmpty(expectedPositionNames)){
            this.expectedPositionNames = Lists.newArrayList(expectedPositionNames.split(","));
        }
    }

}
